﻿using System;
using System.Data;

namespace SBRepository
{
    /// <summary>
    /// Represents Unity of Work abstraction.
    /// </summary>
    public interface ISession : IDisposable
    {
        /// <summary>
        /// Gets the database connection.
        /// </summary>
        /// <value>The database connection.</value>
        IDbConnection Connection { get; }

        /// <summary>
        /// Commits current session.
        /// </summary>
        void Commit();
    }
}
